import request from '@/utils/request'
// 获取供应商列表
export function listSupplier(query) {
  return request({
    url: '/customer/supplier/access/list',
    method: 'get',
    params: query
  })
}
// 获取A8供应商列表
export function listSupplierA8(query) {
  return request({
    url: '/customer/supplier/access/getSupplierFromA8',
    method: 'get',
    params: query
  })
}
// 保存供应商
export function setSupplier(data) {
  return request({
    url: '/customer/supplier/access/save',
    method: 'post',
    data
  })
}
// 保存供应商变更
export function setAlterSupplier(data) {
  return request({
    url: '/customer/supplier/access/alter/supplier',
    method: 'post',
    data
  })
}
//删除供应商
export function delSupplier(ids) {
  return request({
    url: '/customer/supplier/access/delete/' + ids,
    method: 'post'
  })
}
//通过id获取供应商详情
export function getSupplier(id) {
  return request({
    url: '/customer/supplier/access/get/' + id,
    method: 'get'
  })
}

// 供应商评价列表
export function listEvaluate(query) {
  return request({
    url: '/customer/supplier/evaluate/list',
    method: 'get',
    params: query
  })
}
// 保存供应商评价
export function setEvaluate(data) {
  return request({
    url: '/customer/supplier/evaluate/save',
    method: 'post',
    data
  })
}
//删除供应商评价
export function delEvaluate(ids) {
  return request({
    url: '/customer/supplier/evaluate/delete/' + ids,
    method: 'post'
  })
}
//通过id获取供应商评价详情
export function getEvaluate(id) {
  return request({
    url: '/customer/supplier/evaluate/get/' + id,
    method: 'get'
  })
}

// 黑灰名单列表
export function listBlackList(query) {
  return request({
    url: '/customer/supplier/blackList/list/',
    method: 'get',
    params: query
  })
}
//删除黑灰名单
export function delBlackList(ids) {
  return request({
    url: '/customer/supplier/blackList/delete/' + ids,
    method: 'post'
  })
}
//导入黑灰名单
export function importBlackList(data) {
  return request({
    url: '/customer/supplier/blackList/import',
    method: 'post',
    data
  })
}
